# import datetime
#
# from sqlalchemy import UniqueConstraint
#
# from . import db
#
#
# class User(db.Model):
#     __tablename__="User"
#     id=db.Column(db.BigInteger,primary_key=True,autoincrement=True)
#     phone=db.Column(db.Integer,nullable=False)
#     account=db.Column(db.String(225),nullable=False)
#     avatar=db.Column(db.String(225),nullable=False)
#     sex=db.Column(db.Integer,nullable=False)
#     birth_data=db.Column(db.DateTime,default=datetime.datetime.now)
#     profile_photo=db.Column(db.String(225))
#     following_count=db.Column(db.Integer,default=0)
#     fans_count=db.Column(db.Integer,default=0)
#     password=db.Column(db.String(225),default="",)
#     ctime=db.Column(db.DateTime,default=datetime.datetime.now)
#     mtime=db.Column(db.DateTime,default=datetime.datetime.now,onupdate=datetime.datetime.now())
#
#
# class relation(db.Model):
#     __tablename__ = "relation"
#     __table_arge=(
#         UniqueConstraint('target_user_id','user_id','relation',name='relation_unique')
#     )
#     id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
#     target_user_id=db.Column(db.String(225))
#     user_id = db.Column(db.String(225))
#     relation=db.Column(db.String(225),default='关注')
#     ctime = db.Column(db.DateTime, default=datetime.datetime.now)
#     mtime = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now())